import { DEVICE } from './api'
import { METHOD, request } from '@/utils/request'

export async function deviceDetail(id) {
  return request(DEVICE + '/queryOne', METHOD.GET, { id: id })
}

export async function devicePage(data) {
  return request(DEVICE + '/page', METHOD.POST, data)
}

export async function saveOrUpdateDevice(data) {
  return request(DEVICE + '/saveOrUpdate', METHOD.POST, data)
}

export default { deviceDetail, devicePage, saveOrUpdateDevice }